﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CMN.Entity;
namespace CMN.Models.Interfaces
{
    /// <summary>
    /// Service 接口
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IDataService<T>
    {
        /// <summary>
        /// 返回单个
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Sys_ModuleEntity</returns>
        T Look(int id);
      

        /// <summary>
        /// 返回查询列表
        /// </summary>
        /// <param name="qp"></param>
        /// <param name="count">查询总个数</param>
        /// <returns>List</returns>
        List<T> List(QueryParam qp, out int count);


        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="Sys_ModuleEntity"></param>
        /// <returns>bool</returns>
        string Insert(T insertEntity);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="Sys_Module"></param>
        /// <returns>bool</returns>
        string Update(T updateEntity);
        

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Sys_Module"></param>
        /// <returns>bool</returns>
        string Delete(T deleteEntity);

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="Sys_Module"></param>
        /// <returns>bool</returns>
        string DeleteList(string  idList);
       


        
    }
}


